package com.example.supplychainbackend.mapper;

import com.example.supplychainbackend.controller.dto.plan.*;
import com.example.supplychainbackend.controller.dto.plan.cost.CostInfoDto;
import com.example.supplychainbackend.entity.plan.*;
import com.example.supplychainbackend.entity.plan.cost.CostInfoEntity;
import org.mapstruct.Builder;
import org.mapstruct.Mapper;

import java.util.List;

@Mapper(componentModel = "spring",
        builder = @Builder(disableBuilder = true))
public interface PlanMapper {
    PlanOrderDto toPlanOrderDto(PlanOrderEntity entity);
    ProductionDescDto toProdDescDto(PlanOrderEntity entity);
    ProductionScheduleDto toProdScheDto(ProductionScheduleEntity entity);
    MaterialInfoDto toMatInfoDto(MaterialInfoEntity entity);
    CostInfoDto toCostInfoDto(CostInfoEntity entity);

    PlanOrderEntity toPlanOrderEntity(PlanOrderDto dto);
    PlanOrderEntity toPlanOrderEntity(PlanOrderDetailDto dto);
    ProductionScheduleEntity toProdScheEntity(ProductionScheduleDto dto);
    MaterialInfoEntity toMatInfoEntity(MaterialInfoDto dto);
    CostInfoEntity toCostInfoEntity(CostInfoDto dto);

    List<PlanOrderDto> toPlanOrderDtoList(List<PlanOrderEntity> entity);
    List<MaterialInfoDto> toMatInfoDtoList(List<MaterialInfoEntity> entities);
    List<MatchingPlanDto> toMatchPlanDtoList(List<MatchingPlanEntity> entities);
    List<BOMInfoDto> toBomDtoList(List<BOMInfoEntity> entities);

    List<MaterialInfoEntity> toMatInfoEntityList(List<MaterialInfoDto> dtos);
    List<MatchingPlanEntity> toMatchPlanEntityList(List<MatchingPlanDto> dtos);
    List<BOMInfoEntity> toBomEntityList(List<BOMInfoDto> dtos);

}
